﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Shapes;

namespace KBS8.Shared
{
    public class MapTile
    {
        /// <summary>
        /// color and number are used purely for testing and will be obsolete once the actual map data is used.
        /// </summary>
        public Color color;
        public Rectangle rec;
        public int X, Y, number;

        public MapTile(int x, int y, int zoomLevel, int number, Color color)
        {
            X = x;
            Y = y;
            this.number = number;
            this.color = color;
            rec = new Rectangle
            {
                Height = zoomLevel * 50,
                Width = zoomLevel * 50,
                Stroke = new SolidColorBrush(color),
                StrokeThickness = 1
            };
        }
        /// <summary>
        /// Change the size of the rectangle for the mapview.
        /// </summary>
        /// <param name="zoomLevel">the zoomLevel is required for calculating the size.</param>
        public void ChangeSize(int zoomLevel)
        {
            rec.Height = zoomLevel * 50;
            rec.Width = zoomLevel * 50;
        }
    }
}
